


import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;

public class SendItemRequest extends NetworkRequest {

	private Socket socket;
	DataInputStream dis;	
	DataOutputStream dos;
	
	public SendItemRequest( String ip, int port )  {
		try {
			socket = new Socket( ip, port );
			
			dos = new DataOutputStream(socket.getOutputStream()) ;
			dis = new DataInputStream(socket.getInputStream());
			
			process();
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
			
	
	@Override
	public Object getResult() {
		return result;
	}

	@Override
	void parsing() {
		
		try {
			dos.writeUTF("클라에서 값을 보냄");
			
			System.out.println(dis.readUTF());
			
			dos.flush();
			dos.close();
			dis.close();
			
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

}
